var dao = require('./user.dao.js');

exports.login = function(credential, handler) {
	var username = credential.username;
	var password = credential.password;
	
	console.log('check user credential...');
	
	dao.login(username, password, handler);
};

// Buddy operations
exports.getBuddies = function(username, handler) {
	dao.getBuddies(username, handler);
};

// Unread operations
exports.getUnread = function(username, friend, handler) {
	dao.getUnread(username, friend, handler);
};

exports.setUnread = function(username, friend, unread) {
	dao.setUnread(username, friend, unread);
};

exports.increaseUnread = function(username, friend) {
	dao.increaseUnread(username, friend);
};

exports.decreaseUnread = function(username, friend) {
	dao.decreaseUnread(username, friend);
};

